package com.zff.rental.vo.apartment.apartment.manager;

import com.zff.rental.entity.apartment.ApartmentManager;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 公寓管理员表
 *
 * @author HCY
 */
@Data
@NoArgsConstructor
public class ApartmentManagerVo {
    /**
     * 公寓Id
     */
    private Long apartmentId;

    /**
     * 用户Id
     */
    private Long userId;

    /**
     * 用户昵称
     */
    private String userNickname;

    /**
     * 是否为管理员 1:是，0:否
     */
    private Byte isAdmin;

    /**
     * 是否为管家 1:是，0:否
     */
    private Byte isButler;

    public ApartmentManagerVo(ApartmentManager manager, String userNickname) {
        this.apartmentId = manager.getApartmentId();
        this.userId = manager.getUserId();
        this.userNickname = userNickname;
        this.isAdmin = manager.getIsAdmin();
        this.isButler = manager.getIsButler();
    }
}
